<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <script src="js/alert.js"></script>
    <title>会员中心</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .div_group {
            float: left;
            width: 30%;
            height: 185px;
        }
        .div_group-b {
            float: left;
            width: 33.3%;
            height: 100px;
            text-align: center;
            padding-top: 7%;
            color: #445b8b;
            font-size: 15px;
            font-weight: 550;

        }
        .div_group-b img{
            width: 50%;
        }
    </style>
</head>
<body>
<div style="background-color: #445b8b;width: 100%;height: 185px;color: #fff">
    <div class="div_group" style="width: 30%;">
        <img id="img" src="img/123.png" style="width: 50%;border-radius:50%;margin-top: 40%;margin-left: 25%;">
    </div>
    <div class="div_group" style="width: 35%;">
        <div style="font-size: 1em;margin: 37% 0 15% 0;" id="name">会员名: </div>

            <div style="font-size: 12px;" id="integral">积分余额: 0</div>
            <div style="font-size: 12px;margin-top: 10px" id="price">账户余额: 0</div>


    </div>

    <div class="div_group">
        <div style="margin-top: 44%;">
            <span style="background-color: #7e95c4;padding: 3% 13%;border-radius: 18px;font-size: 13px;" id="type">
                积分卡
            </span></div>
    </div>
</div>
<div>
    <div class="div_group-b" id="div-item">
        <div><img src="images/tp1.png"></div>
        <div>会员资料</div>
    </div>
    <div class="div_group-b" id="div-coupon">
        <div><img src="images/tp2.png"></div>
        <div>优惠券</div>
    </div>
    <div class="div_group-b" id="div-store">
        <div><img src="images/tp4.png"></div>
        <div>门店列表</div>
    </div>
    <div class="div_group-b" id="div-action">
        <div><img src="images/tp5.png"></div>
        <div>会员任务</div>
    </div>
    <div class="div_group-b" id="div-integral">
        <div><img src="images/tp6.png"></div>
        <div>积分兑换</div>
    </div>
    <div class="div_group-b" id="#">
        <div><img src="images/tp3.png"></div>
        <div>会员权益</div>
    </div>

</div>

</body>
<script src="js/jquery.min.js"></script>
<script>

    $(document).ready(function () {
        $.ajax({
            "url": "/vip/getuser/",
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                var data = json.data;
                $("#img").attr('src', data.img);
                $("#name").html("会员名：" + data.name);
                $("#integral").html("积分余额：" + data.integral);
                $("#price").html("账户余额：" + data.price);
                $("#type").html(data.type);
            }
        })
    });

    $("#div-coupon").click(function () {
        location.href = "user-coupon.html";
    });

    $("#div-item").click(function () {
        location.href = "user-item.html";
    });

    $("#div-store").click(function () {
        location.href = "user-store.html";
    });

    $("#div-action").click(function () {
        location.href = "user-complement.html";
    });
    $("#div-integral").click(function () {
        location.href = "conversion.html";
    });
    $("#integral").click(function () {
        location.href = "vip-recharge-i.html";
    });
    $("#price").click(function () {
        location.href = "vip-recharge-p.html";
    });
    </script>
<!--禁止页面回退-->
<script language="javascript">
    //防止页面后退
    history.pushState(null, null, document.URL);
    window.addEventListener('popstate', function () {
        history.pushState(null, null, document.URL);
    });
</script>

</html>